Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-user is "distance-from-coordinates">

It allows to calculate the distance in meter from two GPS Coordinates

Inputs

A JSON with these parameters:
sourcelatitude number
latitude of a GPS position
sourcelongitude number
longitude of a GPS position
destinationlatitude number
latitude of a GPS position
destinationlongitude number
longitude of a GPS position

Outputs

Distance
Returns the value (in meters) of the distance calculated between the two point inserted

Details

The node can receive a JSON with the parameters described in the Inputs section and with them generate the output JSON. If the values are not present in the input JSON, these are read by those in the configuration. If they are not present in either part, an error is generated for the necessary parameters.